export default {
  methods: {
    //点击导出
    exportClick: function (dataSelf) {
      //   'userinfo/userDownFile', { typeName, nums ,haveNums ,noNums,  noLogin}
      this.$store.dispatch('userinfo/userPowerLook', {
        typeName: this.typeName,
        nums: this.num,
        userData: {
          productcode: this.code,
        },
        havePower: () => {
          this.exportData(dataSelf)
        },
        haveNums: () => {
          this.exportData(dataSelf)
        },
        noNums: () => {
          this.$emit('buy')
        },
        noLogin: () => {
          this.$store.dispatch('global-dialog/showLogin');
        },
      });
    },

    //使用次数
    useNums(code) {
      this.$store.dispatch('userinfo/userUsedNums', {
        userData: {
          productcode: code,
        },
        success: data => {
          this.$emit('close');
        },
      })
    },
  },
}
